/*
 ============================================================================
 Name		: TheWebAppUi.cpp
 Author	  : Vitaly Yevtushenko
 Copyright   : Licensed under GPL V2
 Description : CTheWebAppUi implementation
 ============================================================================
 */

// INCLUDE FILES
#include <avkon.hrh>
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <f32file.h>
#include <s32file.h>

#include <TheWeb_0xE8862163.rsg>

#include "TheWeb.hrh"
#include "TheWeb.pan"
#include "TheWebApplication.h"
#include "TheWebAppUi.h"
#include "TheWebAppView.h"

// ============================ MEMBER FUNCTIONS ===============================


// -----------------------------------------------------------------------------
// CTheWebAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CTheWebAppUi::ConstructL()
	{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAppOrientationPortrait);

	// Create view object
	iAppView = CTheWebAppView::NewL(ClientRect());
	}

// -----------------------------------------------------------------------------
// CTheWebAppUi::CTheWebAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CTheWebAppUi::CTheWebAppUi()
	{
	// No implementation required
	}

// -----------------------------------------------------------------------------
// CTheWebAppUi::~CTheWebAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CTheWebAppUi::~CTheWebAppUi()
	{
	if (iAppView)
		{
		delete iAppView;
		iAppView = NULL;
		}

	}

// -----------------------------------------------------------------------------
// CTheWebAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CTheWebAppUi::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;

		default:
			break;
		}
	}
// -----------------------------------------------------------------------------
//  Called by the framework when the application status pane
//  size is changed.  Passes the new client rectangle to the
//  AppView
// -----------------------------------------------------------------------------
//
void CTheWebAppUi::HandleStatusPaneSizeChange()
	{
	iAppView->SetRect(ClientRect());
	}

// End of File
